name: Build and Test

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        node-version: 'latest'
    - uses: browser-actions/setup-chrome@v1
    - uses: browser-actions/setup-firefox@v1
    - name: Install dependencies
      run: npm install
    - name: Run source tests
      run: npm run test
    - name: Build and run dist/ tests
      run: |
        npm run build 
        npm run test_dist 
